<template>
  <div class="talk">
    <button @click="getLoveTalk1">获得一个土味情话</button>
    <ul>
      <li v-for="g in talklist" :key="g.id">{{ g.title }}</li>
    </ul>

  </div>
</template>

<script setup lang="ts" name="LoveTalk">
import { useLoveTalkStore } from '@/store/loveTalk.ts'
import { storeToRefs } from "pinia";
const talkStore = useLoveTalkStore()
const {talklist}= storeToRefs(talkStore)
function getLoveTalk1(){
  talkStore.getLoveTalk()
}
</script>

<style scoped>
.talk{
  background-color: orange;
  padding: 0 30px;
  border-radius: 10px;
  box-shadow:0 0 10px;
}
</style>@/store/loveTalk